package org.qloudgen.borg.pages;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.core.request.handler.BookmarkablePageRequestHandler;
import org.apache.wicket.core.request.handler.PageProvider;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.qloudgen.borg.pages.frame.BodyFrame;
import org.qloudgen.borg.pages.frame.PageFrame;
import org.qloudgen.borg.pages.frame.TopFrame;

public class MainPage extends WebPage{

	/**
	 * @Author youngeryoyo
	 * youngeryoyo@gmail.com
	 */

	static Log log = LogFactory.getLog(MainPage.class);

	private static final long serialVersionUID = 1L;
	
	public MainPage(PageParameters pageParameters){
		
		super();
		
		IRequestHandler topFrameHandler = new BookmarkablePageRequestHandler(new PageProvider(
	            TopFrame.class));
        PageFrame topFrame = new PageFrame("topFrame", topFrameHandler);
        add(topFrame);
	        
        IRequestHandler bodyFrameHandler = new BookmarkablePageRequestHandler(new PageProvider(
            BodyFrame.class));
        PageFrame bodyFrame = new PageFrame("bodyFrame", bodyFrameHandler);
        bodyFrame.setOutputMarkupId(true);
        add(bodyFrame);
        
	}

}
